<?php

/**
 * Created by PhpStorm.
 * User: mrjnamei
 * Date: 17-5-12
 * Time: 上午10:35
 */

namespace App\Winged\Patients\Api;

class Api extends \App\Winged\Auth\Backend\Api\Api
{
    /* 模块名前缀，兼容以前的接口所有改成带 / 的 */
    protected static $module = 'medicalcase/patient_db';

    public static $needToken = true ;

    /*****todo 以下两个接口还没做改动，有bug.  *****/

    public static function doTransfer($path , $method , $params = null){
        $path = static::$module . "/" . $path ;
        list($status, $content) = app()->http->request($path, $method , $params, self::getHeader());
        return [$status,$content];
    }

    public static function doUpload($path, $params) {
        $headers = self::getHeader();
        list($status, $content) = app()->http->request($path, WingedHttp::POST , $params, $headers);
        return [$status,$content];
    }


}
